import io.swagger.annotations.ApiModel;
import org.apache.commons.collections4.ListUtils;
import org.assertj.core.util.Lists;

import java.util.ArrayList;

/**
 * 视频源业务标签：
 * 1 智慧教育、2智慧市监、3智慧城管、4智慧社区、5智慧文旅、6智慧安监、7智慧卫健 8智慧水务
 */
@ApiModel(description = "APP0001  智慧教育\n" +
        "APP0002 智慧市监\n" +
        "APP0003 智慧城管\n" +
        "APP0004 智慧社区\n" +
        "APP0005 智慧文旅\n" +
        "APP0006 智慧安监\n" +
        "APP0007 智慧卫健" +
        "APP0008 智慧水务")
public enum BusinessThemeEnum {
    APP0001(1, "AI_EDUCATION"),
    APP0002(2, "AI_SUPERVISE"),
    APP0003(3, "AI_MANAGEMENT"),
    APP0004(4, "AI_COMMUNITY"),
    APP0005(5, "AI_CULTURAL"),
    APP0006(6, "AI_SAFETY"),
    APP0007(7, "AI_HEALTH"),
    APP0008(8, "AI_WATERAFFAIRS");

    private Integer key;

    private String value;

    public Integer getKey() {
        return key;
    }

    public void setKey(Integer key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    BusinessThemeEnum(Integer key, String value) {
        this.key = key;
        this.value = value;
    }

    public static BusinessThemeEnum fromKey(Integer keyValue) {
        BusinessThemeEnum[] arrs = BusinessThemeEnum.values();
        for (BusinessThemeEnum info : arrs) {
            if (info.key.equals(keyValue)) {
                return info;
            }
        }
        return null;
    }

    public static void main(String[] args) {
        ArrayList<BusinessThemeEnum> lista = Lists.newArrayList();
        lista.add(BusinessThemeEnum.APP0001);
        lista.add(BusinessThemeEnum.APP0002);
        ArrayList<BusinessThemeEnum> listb = Lists.newArrayList();
        listb.add(BusinessThemeEnum.APP0003);
        listb.add(BusinessThemeEnum.APP0002);
        listb.add(BusinessThemeEnum.APP0001);

        System.out.println(ListUtils.subtract(lista,listb).size()>0);
        System.out.println(lista.containsAll(listb));
    }
}
